package com.jmeurope.action;

import java.util.List;

import org.apache.struts2.json.annotations.JSON;
import org.springframework.beans.factory.annotation.Autowired;

import com.jmeurope.model.Project;
import com.jmeurope.service.ProjectService;
import com.opensymphony.xwork2.ActionSupport;
/**
 * 
 * <p>
 * Description: 
 * </p>
 *
 * @author shanming
 * @version 1.0

 * <p>
 * History: 
 *
 * Date                     Author         Version     Description
 * ---------------------------------------------------------------------------------
 * 2012-1-2 下午4:41:46          wangwei        1.0         To create
 * </p>
 *
 * @since 
 * @see
 */
public class JMProjectAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Autowired
	ProjectService projectService;
	List<Project> rows;
	@JSON(serialize=false)
	public String getAllProject(){
		try {
			rows=this.projectService.getAllProjects();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return SUCCESS;
	}
	public List<Project> getRows() {
		return rows;
	}
}
